import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  resolve: {
    // 配置路径别名
    alias: {
      '@': '/src'
    }
  },
  server: {
    proxy: {
      '/blogview': {
        target: `http://xjlyh.site:7777`,
        // target: "http://localhost:7777",
        changeOrigin: true //需要代理跨域
        // rewrite: (path) => path.replace(/^\/api/, ''),
      }
    }
  }
})
